import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
import { Video } from './video.entity';

@Entity()
export class VideoAudit {
  @PrimaryGeneratedColumn()
  audit_id: number;

  @ManyToOne(() => Video)
  @JoinColumn({ name: 'video_id' })
  video: Video;

  @Column({ type: 'enum', enum: ['auto', 'manual'], default: 'auto' })
  audit_type: string;

  @Column({ type: 'enum', enum: ['pass', 'reject'] })
  audit_result: string;

  @Column({ type: 'text' })
  audit_details: string;

  @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
  created_at: Date;
}